```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Seata分布式事务框架详解 | 技术小馆</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            color: #333;
            line-height: 1.6;
        }
        .serif {
            font-family: 'Noto Serif SC', serif;
        }
        .hero-gradient {
            background: linear-gradient(135deg, #6e8efb 0%, #4a6cf7 100%);
        }
        .card-hover {
            transition: all 0.3s ease;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }
        .card-hover:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
        }
        .highlight {
            position: relative;
            z-index: 1;
        }
        .highlight::before {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 30%;
            background-color: rgba(74, 108, 247, 0.2);
            z-index: -1;
            transform: scaleX(1.05);
            transition: all 0.3s ease;
        }
        .highlight:hover::before {
            height: 50%;
            background-color: rgba(74, 108, 247, 0.3);
        }
        .mode-icon {
            font-size: 2.5rem;
            color: #4a6cf7;
            margin-bottom: 1rem;
        }
        .feature-badge {
            display: inline-block;
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
            font-size: 0.8rem;
            font-weight: 600;
            margin-right: 0.5rem;
            margin-bottom: 0.5rem;
        }
        .pros-badge {
            background-color: rgba(40, 167, 69, 0.2);
            color: #28a745;
        }
        .cons-badge {
            background-color: rgba(220, 53, 69, 0.2);
            color: #dc3545;
        }
        .mermaid {
            background-color: white;
            border-radius: 0.5rem;
            padding: 1.5rem;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <div class="hero-gradient text-white py-20 px-4">
        <div class="container mx-auto max-w-5xl">
            <div class="flex flex-col items-center text-center">
                <h1 class="serif text-4xl md:text-5xl font-bold mb-6 leading-tight">探索Seata分布式事务框架</h1>
                <p class="text-xl md:text-2xl mb-8 max-w-3xl opacity-90">高效管理微服务架构中的复杂事务流程</p>
                <div class="bg-white bg-opacity-20 rounded-full px-6 py-2 flex items-center">
                    <i class="fas fa-lightbulb mr-2"></i>
                    <span>分布式系统的终极事务解决方案</span>
                </div>
            </div>
        </div>
    </div>

    <!-- Main Content -->
    <div class="container mx-auto max-w-5xl px-4 py-12">
        <!-- Introduction -->
        <section class="mb-16">
            <div class="bg-white rounded-xl p-8 shadow-lg">
                <h2 class="serif text-3xl font-bold mb-6 text-gray-800">什么是Seata？</h2>
                <p class="text-lg mb-4">Seata 是一款开源的分布式事务框架，为微服务架构下的事务一致性提供了全面的解决方案。它通过多种事务模式满足不同业务场景的需求，简化了分布式系统中的事务管理。</p>
                <p class="text-lg">无论您需要简单易用的自动事务管理，还是对事务过程有精细控制的需求，Seata都能提供适合的解决方案，帮助开发者构建可靠、高效的分布式系统。</p>
            </div>
        </section>

        <!-- Comparison Chart -->
        <section class="mb-16">
            <div class="bg-white rounded-xl p-6 shadow-lg">
                <h2 class="serif text-3xl font-bold mb-6 text-gray-800">Seata事务模式对比</h2>
                <div class="mermaid">
                    graph TD
                    A[Seata事务模式] --> B[AT模式]
                    A --> C[TCC模式]
                    A --> D[SAGA模式]
                    A --> E[XA模式]
                    B -->|适用性| F[关系型数据库]
                    C -->|适用性| G[需要精细控制的业务]
                    D -->|适用性| H[长事务场景]
                    E -->|适用性| I[支持XA协议的DB]
                </div>
            </div>
        </section>

        <!-- AT Mode Section -->
        <section class="mb-16">
            <div class="grid md:grid-cols-3 gap-8">
                <div class="md:col-span-1">
                    <div class="bg-white rounded-xl p-6 h-full card-hover">
                        <div class="mode-icon">
                            <i class="fas fa-robot"></i>
                        </div>
                        <h3 class="serif text-2xl font-bold mb-4 text-gray-800">AT 模式</h3>
                        <p class="text-gray-600 mb-4">Automatic Transaction 模式</p>
                        <div class="border-t border-gray-200 pt-4">
                            <span class="feature-badge pros-badge">自动管理事务</span>
                            <span class="feature-badge pros-badge">易用性强</span>
                            <span class="feature-badge cons-badge">性能损耗</span>
                        </div>
                    </div>
                </div>
                <div class="md:col-span-2">
                    <div class="bg-white rounded-xl p-8 h-full">
                        <h3 class="serif text-2xl font-bold mb-4 text-gray-800">特点</h3>
                        <p class="mb-6">AT 模式是 Seata 最常用的模式，主要面向传统的关系型数据库。它通过代理数据库的 <code class="bg-gray-100 px-2 py-1 rounded">commit</code> 和 <code class="bg-gray-100 px-2 py-1 rounded">rollback</code> 操作来自动管理事务。在事务过程中，Seata 会在每个数据库操作前自动生成一个 Undo Log，以便在需要回滚时能够恢复数据到事务开始前的状态。</p>
                        
                        <div class="grid md:grid-cols-2 gap-6">
                            <div>
                                <h4 class="font-bold text-lg mb-3 text-blue-600"><i class="fas fa-check-circle mr-2"></i>优点</h4>
                                <ul class="list-disc pl-5 space-y-2">
                                    <li>开发者不需要手动管理事务</li>
                                    <li>只需要使用普通的数据库操作</li>
                                    <li>Seata自动处理事务提交和回滚</li>
                                </ul>
                            </div>
                            <div>
                                <h4 class="font-bold text-lg mb-3 text-red-500"><i class="fas fa-exclamation-triangle mr-2"></i>缺点</h4>
                                <ul class="list-disc pl-5 space-y-2">
                                    <li>依赖于Undo Log和两阶段提交</li>
                                    <li>性能和事务隔离性会有损耗</li>
                                    <li>对某些特殊SQL支持有限</li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- TCC Mode Section -->
        <section class="mb-16">
            <div class="grid md:grid-cols-3 gap-8">
                <div class="md:col-span-1">
                    <div class="bg-white rounded-xl p-6 h-full card-hover">
                        <div class="mode-icon">
                            <i class="fas fa-sliders-h"></i>
                        </div>
                        <h3 class="serif text-2xl font-bold mb-4 text-gray-800">TCC 模式</h3>
                        <p class="text-gray-600 mb-4">Try-Confirm-Cancel 模式</p>
                        <div class="border-t border-gray-200 pt-4">
                            <span class="feature-badge pros-badge">灵活性高</span>
                            <span class="feature-badge pros-badge">性能优越</span>
                            <span class="feature-badge cons-badge">实现复杂</span>
                        </div>
                    </div>
                </div>
                <div class="md:col-span-2">
                    <div class="bg-white rounded-xl p-8 h-full">
                        <h3 class="serif text-2xl font-bold mb-4 text-gray-800">特点</h3>
                        <p class="mb-6">TCC 模式是一种更加灵活的分布式事务处理模式，主要适用于那些需要精准控制事务逻辑的场景。它要求开发者实现三个操作：Try（预留资源），Confirm（确认执行），Cancel（取消执行）。在第一阶段，Try 阶段会预留资源，第二阶段会根据情况执行 Confirm 或 Cancel。</p>
                        
                        <div class="grid md:grid-cols-2 gap-6">
                            <div>
                                <h4 class="font-bold text-lg mb-3 text-blue-600"><i class="fas fa-check-circle mr-2"></i>优点</h4>
                                <ul class="list-disc pl-5 space-y-2">
                                    <li>提供了更高的灵活性</li>
                                    <li>性能优于AT模式</li>
                                    <li>适合精细控制事务过程</li>
                                </ul>
                            </div>
                            <div>
                                <h4 class="font-bold text-lg mb-3 text-red-500"><i class="fas fa-exclamation-triangle mr-2"></i>缺点</h4>
                                <ul class="list-disc pl-5 space-y-2">
                                    <li>需要手动编写业务逻辑</li>
                                    <li>开发复杂度较高</li>
                                    <li>需要业务系统支持TCC接口</li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- SAGA Mode Section -->
        <section class="mb-16">
            <div class="grid md:grid-cols-3 gap-8">
                <div class="md:col-span-1">
                    <div class="bg-white rounded-xl p-6 h-full card-hover">
                        <div class="mode-icon">
                            <i class="fas fa-clock"></i>
                        </div>
                        <h3 class="serif text-2xl font-bold mb-4 text-gray-800">SAGA 模式</h3>
                        <p class="text-gray-600 mb-4">长事务解决方案</p>
                        <div class="border-t border-gray-200 pt-4">
                            <span class="feature-badge pros-badge">适合长事务</span>
                            <span class="feature-badge pros-badge">高并发</span>
                            <span class="feature-badge cons-badge">补偿逻辑复杂</span>
                        </div>
                    </div>
                </div>
                <div class="md:col-span-2">
                    <div class="bg-white rounded-xl p-8 h-full">
                        <h3 class="serif text-2xl font-bold mb-4 text-gray-800">特点</h3>
                        <p class="mb-6">SAGA 模式是长事务场景下的一种分布式事务解决方案。它将全局事务拆分成一系列本地事务，每个本地事务都包含一个补偿操作（即回滚操作）。如果某个事务失败，系统会自动调用对应的补偿操作来回滚已经完成的事务。</p>
                        
                        <div class="grid md:grid-cols-2 gap-6">
                            <div>
                                <h4 class="font-bold text-lg mb-3 text-blue-600"><i class="fas fa-check-circle mr-2"></i>优点</h4>
                                <ul class="list-disc pl-5 space-y-2">
                                    <li>适合长时间运行的事务</li>
                                    <li>减少锁的占用时间</li>
                                    <li>提高系统的并发能力</li>
                                </ul>
                            </div>
                            <div>
                                <h4 class="font-bold text-lg mb-3 text-red-500"><i class="fas fa-exclamation-triangle mr-2"></i>缺点</h4>
                                <ul class="list-disc pl-5 space-y-2">
                                    <li>补偿逻辑编写复杂</li>
                                    <li>需要确保补偿操作幂等</li>
                                    <li>数据一致性最终一致</li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- XA Mode Section -->
        <section class="mb-16">
            <div class="grid md:grid-cols-3 gap-8">
                <div class="md:col-span-1">
                    <div class="bg-white rounded-xl p-6 h-full card-hover">
                        <div class="mode-icon">
                            <i class="fas fa-database"></i>
                        </div>
                        <h3 class="serif text-2xl font-bold mb-4 text-gray-800">XA 模式</h3>
                        <p class="text-gray-600 mb-4">标准化事务协议</p>
                        <div class="border-t border-gray-200 pt-4">
                            <span class="feature-badge pros-badge">严格一致性</span>
                            <span class="feature-badge pros-badge">标准协议</span>
                            <span class="feature-badge cons-badge">性能较差</span>
                        </div>
                    </div>
                </div>
                <div class="md:col-span-2">
                    <div class="bg-white rounded-xl p-8 h-full">
                        <h3 class="serif text-2xl font-bold mb-4 text-gray-800">特点</h3>
                        <p class="mb-6">XA 模式基于 XA 规范，提供了一个标准的两阶段提交协议来处理分布式事务。它主要面向支持 XA 协议的数据库，Seata 作为协调者，管理各个参与者的事务提交和回滚。</p>
                        
                        <div class="grid md:grid-cols-2 gap-6">
                            <div>
                                <h4 class="font-bold text-lg mb-3 text-blue-600"><i class="fas fa-check-circle mr-2"></i>优点</h4>
                                <ul class="list-disc pl-5 space-y-2">
                                    <li>确保严格的事务一致性</li>
                                    <li>基于成熟的XA标准协议</li>
                                    <li>适合传统数据库系统</li>
                                </ul>
                            </div>
                            <div>
                                <h4 class="font-bold text-lg mb-3 text-red-500"><i class="fas fa-exclamation-triangle mr-2"></i>缺点</h4>
                                <ul class="list-disc pl-5 space-y-2">
                                    <li>性能较差，执行时间长</li>
                                    <li>资源长时间占用</li>
                                    <li>对XA协议支持有限</li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Summary Section -->
        <section class="mb-16">
            <div class="bg-white rounded-xl p-8 shadow-lg">
                <h2 class="serif text-3xl font-bold mb-6 text-gray-800">如何选择合适的事务模式？</h2>
                <div class="grid md:grid-cols-2 gap-8">
                    <div>
                        <div class="flex items-start mb-4">
                            <div class="bg-blue-100 text-blue-800 rounded-full p-2 mr-4">
                                <i class="fas fa-check-circle"></i>
                            </div>
                            <div>
                                <h3 class="font-bold text-lg mb-2">AT模式</h3>
                                <p class="text-gray-600">适合简单的事务场景，希望尽可能少地修改业务代码，能接受最终一致性的应用。</p>
                            </div>
                        </div>
                        <div class="flex items-start mb-4">
                            <div class="bg-purple-100 text-purple-800 rounded-full p-2 mr-4">
                                <i class="fas fa-sliders-h"></i>
                            </div>
                            <div>
                                <h3 class="font-bold text-lg mb-2">TCC模式</h3>
                                <p class="text-gray-600">适合对事务过程需要精细控制，追求高性能，业务系统能支持TCC接口的应用。</p>
                            </div>
                        </div>
                    </div>
                    <div>
                        <div class="flex items-start mb-4">
                            <div class="bg-green-100 text-green-800 rounded-full p-2 mr-4">
                                <i class="fas fa-clock"></i>
                            </div>
                            <div>
                                <h3 class="font-bold text-lg mb-2">SAGA模式</h3>
                                <p class="text-gray-600">适合长时间运行的事务，或者需要避免长时间锁资源的应用场景。</p>
                            </div>
                        </div>
                        <div class="flex items-start">
                            <div class="bg-indigo-100 text-indigo-800 rounded-full p-2 mr-4">
                                <i class="fas fa-database"></i>
                            </div>
                            <div>
                                <h3 class="font-bold text-lg mb-2">XA模式</h3>
                                <p class="text-gray-600">适合需要严格事务一致性，并且数据库支持XA协议的传统应用系统。</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </div>

    <!-- Footer -->
    <footer class="bg-gray-900 text-white py-8">
        <div class="container mx-auto max-w-5xl px-4">
            <div class="flex flex-col md:flex-row justify-between items-center">
                <div class="mb-4 md:mb-0">
                    <h3 class="text-xl font-bold">技术小馆</h3>
                </div>
                <div>
                    <a href="http://www.yuque.com/jtostring" class="text-gray-300 hover:text-white transition-colors">
                        <i class="fas fa-external-link-alt mr-2"></i>http://www.yuque.com/jtostring
                    </a>
                </div>
            </div>
            <div class="border-t border-gray-800 mt-6 pt-6 text-center text-gray-400 text-sm">
                &copy; 2023 技术小馆. 保留所有权利.
            </div>
        </div>
    </footer>

    <script>
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: false,
                htmlLabels: true,
                curve: 'basis'
            }
        });
    </script>
</body>
</html>
```